namespace CXX_SV_PRIVATE_KEY_UNENCRYPTED {
#include <QOpcUaProvider>
#include <QOpcUaKeyPair>
#include <QFile>
int main()
{
	// Generate RSA Key
	QOpcUaKeyPair key;
	key.generateRsaKey(QOpcUaKeyPair::RsaKeyStrength::Bits1024);

	// Save private key to file
	QByteArray keyData = key.privateKeyToByteArray(QOpcUaKeyPair::Cipher::Unencrypted, "password");

	QFile keyFile("privateKey.pem");
	keyFile.open(QFile::WriteOnly);
	keyFile.write(keyData);
	keyFile.close();
}





#include <QOpcUaProvider>
#include <QOpcUaKeyPair>
#include <QFile>
int main()
{
	// Generate RSA Key
	QOpcUaKeyPair key;
	key.generateRsaKey(QOpcUaKeyPair::RsaKeyStrength::Bits1024);
	QByteArray keyData = key.privateKeyToByteArray(QOpcUaKeyPair::Cipher::Aes128Cbc, "K016w813");

	QFile keyFile("privateKey.pem");
	keyFile.open(QFile::WriteOnly);
	keyFile.write(keyData);
	keyFile.close();
}
}}